﻿@{
    ViewBag.Title = "test1";
    Layout = "~/Views/Shared/_Page.cshtml";
}

<link href="/CSS/hacker-empire/jquery-ui-1.8.23.hacker.css?201209101300" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="/JS/jquery-ui-1.8.23.custom.min.js?201209101728"></script>
<script type="text/javascript" src="/JS/G_Lib/G_Dialog.js?201209261008"></script>
<link rel="stylesheet" type="text/css" href="/CSS/green/styles.css?201209111000" />

<script type="text/javascript">
    //instantiate a simple dialog
    var simpleDialog = new G_SimpleDialog("simpleDialog1", "Simple Dialog", "This is a  simple dialog!", "small");

    //instantiate a confirm dialog
    var confirmDialog = new G_ConfirmDialog("confirmDialog1", "Confirm Dialog", "This is a  confirm dialog!", "small");

    //instantiate a content dialog
    var contentDialog = new G_ContentDialog("contentDialog1", "Content Dialog", "contentId", "medium");

    $(document).ready(function () {
        $.ajaxSetup({ cache: false });

        //Simple Dialog
        simpleDialog.Init();
        $("input#btnSimpleDialog").click(function () {
            simpleDialog.Show();
        });

        //Confirm Dialog
        confirmDialog.Init();
        $("input#btnConfirmDialog").click(function () {
            delRecord("5");
        });
        
        //Content Dialog
        var url = "/Test/TestContent";

        contentDialog.Init();
        contentDialog.LoadContent(url);
        $("input#btnContentDialog").click(function () {
            contentDialog.Show();
        });
    });

    //confirm callback function
    function delRecord(recId) {
        confirmDialog.Show();

        G_ConfirmCallback.ConfirmFunc = function () {
            alert("Record: " + recId + " Deleted Successful!");
        }
    }

</script>

<h1>@ViewBag.CurrentCategory -> @ViewBag.CurrentTech -> @ViewBag.CurrentPage</h1>

<br />

Dialog Test

<br /><br />

<table style="padding:5px;width:70%;">
    <tr>
        <td style="width:40%;">Simple Dialog:</td>
        <td style="width:60%;"><input id="btnSimpleDialog" type="button" value="Open" class="btn" style="width:80px;" /></td>
    </tr>
    <tr>
        <td>Confirm Dialog:</td>
        <td>
            <input id="btnConfirmDialog" type="button" value="Open" class="btn" style="width:80px;" />
        </td>
    </tr>
    <tr>
        <td>Content Dialog:</td>
        <td><input id="btnContentDialog" type="button" value="Open" class="btn" style="width:80px;" /></td>
    </tr>
</table>
























